﻿using System.Runtime.Serialization;
using System.Diagnostics;
using System.CodeDom.Compiler;
using System.ServiceModel;
using Nakio.Framework.Net.Communication;
using System.ServiceModel.Channels;

namespace Nakio.Framework.Net.Client
{    
    [DebuggerStepThroughAttribute]
    [GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [DataContractAttribute(Name="EncryptToken", Namespace="http://schemas.datacontract.org/2004/07/Nakio.Framework.Net.Communication")]
    public partial class EncryptToken : object, IExtensibleDataObject
    {
        public ExtensionDataObject ExtensionData { get; set; }

        [DataMemberAttribute]
        public byte[] IV { get; set; }

        [DataMemberAttribute]
        public byte[] Key { get; set; }
    }
    
    [DebuggerStepThroughAttribute]
    [GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [DataContractAttribute(Name="EncryptedCommand", Namespace="http://schemas.datacontract.org/2004/07/Nakio.Framework.Net.Communication")]
    public partial class EncryptedCommand : object, IExtensibleDataObject
    {
        public ExtensionDataObject ExtensionData { get; set; }

        [DataMemberAttribute]
        public byte[] _command { get; set; }
    }
}


[GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
[ServiceContractAttribute(ConfigurationName="IServerContract", CallbackContract=typeof(IServerContractCallback))]
public interface IServerContract
{
    
    [OperationContractAttribute(Action="http://tempuri.org/IServerContract/LogClient", ReplyAction="http://tempuri.org/IServerContract/LogClientResponse")]
    EncryptToken LogClient(string username, string password);
    
    [OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServerContract/ExecuteCommand")]
    void ExecuteCommand(EncryptedCommand encryptedCommand);
    
    [OperationContractAttribute(Action="http://tempuri.org/IServerContract/ExecuteReturnCommand", ReplyAction="http://tempuri.org/IServerContract/ExecuteReturnCommandResponse")]
    [ServiceKnownTypeAttribute(typeof(EncryptToken))]
    [ServiceKnownTypeAttribute(typeof(EncryptedCommand))]
    object ExecuteReturnCommand(EncryptedCommand encryptedCommand);
    
    [OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServerContract/LogOffClient")]
    void LogOffClient();
}

[GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public interface IServerContractCallback
{
    
    [OperationContractAttribute(Action="http://tempuri.org/IServerContract/ExecuteClientReturnCommand", ReplyAction="http://tempuri.org/IServerContract/ExecuteClientReturnCommandResponse")]
    [ServiceKnownTypeAttribute(typeof(EncryptToken))]
    [ServiceKnownTypeAttribute(typeof(EncryptedCommand))]
    object ExecuteClientReturnCommand(EncryptedCommand encryptedCommand);
}

[GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public interface IServerContractChannel : IServerContract, IClientChannel
{
}

[DebuggerStepThroughAttribute]
[GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
public partial class ServerContractClient : DuplexClientBase<IServerContract>, IServerContract
{
    
    public ServerContractClient(InstanceContext callbackInstance) : 
            base(callbackInstance)
    {
    }
    
    public ServerContractClient(InstanceContext callbackInstance, string endpointConfigurationName) : 
            base(callbackInstance, endpointConfigurationName)
    {
    }
    
    public ServerContractClient(InstanceContext callbackInstance, string endpointConfigurationName, string remoteAddress) : 
            base(callbackInstance, endpointConfigurationName, remoteAddress)
    {
    }
    
    public ServerContractClient(InstanceContext callbackInstance, string endpointConfigurationName, EndpointAddress remoteAddress) : 
            base(callbackInstance, endpointConfigurationName, remoteAddress)
    {
    }
    
    public ServerContractClient(InstanceContext callbackInstance, Binding binding, EndpointAddress remoteAddress) : 
            base(callbackInstance, binding, remoteAddress)
    {
    }
    
    public EncryptToken LogClient(string username, string password)
    {
        return Channel.LogClient(username, password);
    }
    
    public void ExecuteCommand(EncryptedCommand encryptedCommand)
    {
        Channel.ExecuteCommand(encryptedCommand);
    }
    
    public object ExecuteReturnCommand(EncryptedCommand encryptedCommand)
    {
        return Channel.ExecuteReturnCommand(encryptedCommand);
    }
    
    public void LogOffClient()
    {
        Channel.LogOffClient();
    }
}
